﻿using Factory.MasterData.Materials.Dto;
using Factory.MasterData.Vendors.Dto;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Volo.Abp.Application.Services;

namespace Factory.MasterData.Vendors
{
    /// <summary>
    /// 供应商服务接口
    /// </summary>
    public interface IVendorAppService : IApplicationService
    {
        /// <summary>
        /// 添加供应商信息
        /// </summary>
        /// <param name="vendorDto">添加的供应商信息</param>
        /// <returns>返回结果</returns>
        Task<int> AddVender(VendorDto vendorDto);
        /// <summary>
        /// 供应商信息分页显示
        /// </summary>
        /// <param name="pageIndex">当前页</param>
        /// <param name="pageSize">页容量</param>
        /// <param name="inquireName">供应商名称</param>
        /// <returns>返回结果</returns>
        Task<PageResult> GetVendorPage(int pageIndex, int pageSize, string? inquireName);
        /// <summary>
        /// 删除供应商信息
        /// </summary>
        /// <param name="id">供应商主键</param>
        /// <returns>返回结果</returns>
        Task<int> DeleteVendor(string id);
        /// <summary>
        /// 编辑供应商信息
        /// </summary>
        /// <param name="vendorDto">编辑的供应商信息</param>
        /// <returns>返回结果</returns>
        Task<int> UpdateVender(VendorDto vendorDto);
        /// <summary>
        /// 编辑重复性验证
        /// </summary>
        /// <param name="code">供应商编码</param>
        /// <param name="id">供应商主键</param>
        /// <returns>返回结果</returns>
        Task<int> UpdateRepeatability(string code, int id);
    }
}
